package com.beijing.cyou.model;

import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

@Data
public class Group {

	private Long groupId ;
	
	private String groupName ;
	
	private Integer groupSequence ;
	
	private List<User> members = new ArrayList<User>() ;
	
	private List<Group> subGroups = new ArrayList<Group>() ;

	public Group() {
		super();
	}
	public Group(Long groupId, String groupName) {
		this.groupId = groupId;
		this.groupName = groupName;
	}

	@JsonIgnore
	private Long parentId ;

	@Override
	public String toString() {
		return "Group [Id=" + groupId + ", Name=" + groupName + ",Seq=" + groupSequence + ", parentId=" 
				+ parentId + ", members=" + members.size() + ", subs=" + subGroups.size()  + "]";
	}
	
	
}
